﻿using System;
using System.Collections.Generic;
using System.Text;

namespace C11_Ex01_2
{
    public class Program
    {
        public static void Main()
        {
            System.Console.Write("  *  {0} *** {0}*****{0} *** {0}  *  {0}", Environment.NewLine);

            System.Console.Write("Press any key to continue . . . ");
            System.Console.ReadLine();
        }

        // The next method is for the 3rd excercise.
        // We don't use it in this project.
        public static void PrintDiamod(int i_DiamondHeight)
        {
            if (i_DiamondHeight % 2 == 0 && i_DiamondHeight > 0)
            {
                i_DiamondHeight--;
            }

            int numberOfSpaces = i_DiamondHeight / 2;

            for (int i = 0; i < i_DiamondHeight; i++)
            {
                for (int j = 0; j < numberOfSpaces; j++)
                {
                    System.Console.Write(" ");
                }

                for (int j = 0; j < i_DiamondHeight - (2 * numberOfSpaces); j++)
                {
                    System.Console.Write("*");
                }

                for (int j = 0; j < numberOfSpaces; j++)
                {
                    System.Console.Write(" ");
                }

                if (i < i_DiamondHeight / 2)
                {
                    numberOfSpaces--;
                }
                else
                {
                    numberOfSpaces++;
                }

                System.Console.WriteLine();
            }
        }
    }
}
